<?php
///////////////////////////////////////////////////////////////////////
//Nazov suboru:	adm_contents_random_products.php
//Popis:		Zobrazenie zoznamu tovarov pre vyber do nahodne
//				zobrazovanych tovaroch
//Poznamka:		
//
//Vsetky prava vyhradene
//////////////////////////////////////////////////////////////////////


	define('ABSOLUTE_SERVER_REMOTE_ADDR','http://'.$_SERVER['HTTP_HOST'].'/');
	define('ABSOLUTE_SERVER_DOCUMENT_ROOT','../admin/');

    include(ABSOLUTE_SERVER_DOCUMENT_ROOT.'session.inc');
    require_once(ABSOLUTE_SERVER_DOCUMENT_ROOT.'funct.inc');   
    
	require_once(ABSOLUTE_SERVER_DOCUMENT_ROOT.'functs.inc');
	include ABSOLUTE_SERVER_DOCUMENT_ROOT.'color_style.php';
    include '../classDB.inc.php';

    include LANGUAGE;

    if(!GetAdminID($ID)){echo LOGIN_ERR; exit;}
    if(!Right_Check(2)){header('Location:'.ABSOLUTE_SERVER_DOCUMENT_ROOT.'error.php'); exit;}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
	<?php echo '<meta http-equiv="Content-Type" content="text/html; charset='._CHARSET_.';">'; ?>
    <title><?php echo U_DETAIL_ODBERATELA; ?></title>
	<style  type="text/css">
		table{
            border-bottom-color: black;
            border-top-color: black;
            border-left-color: black;
            border-right-color: black;
            border-collapse: collapse;
            font-size: 10px;
            font-family:  verdana;
        }
        form {margin-top:0pt; margin-bottom:0px;}
        img {margin-top:0pt; margin-bottom:0px;}
        body{
            margin-left:10px;
            margin-right:0pt;
            margin-top:0pt;
            margin-bottom:0pt;
            font-family:  verdana;
            font-size: 10px;
        }
        input {
            border: 1px solid black;
            cursor: pointer;
            background-color: white;
            font-size: 10px;
            margin-left: 0px;
            padding-left: 0px;
            list-style-type: none;
            font-family:  Verdana;
        }
        a {
		  	text-decoration: none; 
		  	font-weight: normal; 
		  	color:black; 
		  	font-size:10px;
		}
		a:hover {
		  	text-decoration: underline; 
			font-weight: normal; 
			color:#808080; 
			font-size:10px;
		}
    </style>
	
</head>

<?php
	print "<body bgcolor=\"".BACKGROUND_IN_TABLE."\" onload=\"this.focus();\">";

	$_DB = new classDB();
    if ($_DB->open()){echo OPEN_DB_ERR; break;}	
	
do{  
	//-----------------------------------------------------------------------------------------------
	//NADPIS
	print "<center><h4 style=\"margin-top:0pt; margin-bottom:0pt;\">".U_DETAIL_ODBERATELA."</h4></center>";
	//-----------------------------------------------------------------------------------------------

    $OID = $_REQUEST['OID'];
    if(!is_numeric($OID) or $OID<1) break;

    $sql_result = mysql_query('SELECT * FROM order_heads WHERE ID='.$OID);
    $sql_object = mysql_fetch_object($sql_result);

    print "
        <table  border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"".TR_BACKGOUND_COLOR_1."\">
        <tr>
            <td>
                    ".U_ORGANIZACIA.":
            </td>
            <td>
                    <b>".$sql_object->OH_Organisation."</b>
            </td>
        </tr>
        <tr>
            <td>
                    ".U_MENO.":
            </td>
            <td>
                    <b>".$sql_object->OH_Name."</b>
            </td>
        </tr>
        <tr>
            <td>
                    ".U_PRIEZVISKO.":
            </td>
            <td>
                    <b>".$sql_object->OH_Surname."</b>
            </td>
        </tr>
        <tr>
            <td>
                    ".U_MESTO.":
            </td>
            <td>
                    <b>".$sql_object->OH_City."</b>
            </td>
        </tr>
        <tr>
            <td>
                    ".U_ULICA.":
            </td>
            <td>
                    <b>".$sql_object->OH_Street."</b>
            </td>
        </tr>
        <tr>
            <td>
                    ".U_PSC.":
            </td>
            <td>
                    <b>".$sql_object->OH_PostID."</b>
            </td>
        </tr>
        <tr>
            <td>
                    ".U_MOBIL.":
            </td>
            <td>
                    <b>".$sql_object->OH_Mobile."</b>
            </td>
        </tr>
        <tr>
            <td>
                    ".U_TEL.":
            </td>
            <td>
                    <b>".$sql_object->OH_Phone."</b>
            </td>
        </tr>
        <tr>
            <td>
                    ".U_MAIL.":
            </td>
            <td>
                    <A HREF=\"mailto:".$sql_object->OH_Email."\">".$sql_object->OH_Email."</A>
            </td>
        </tr>
        <tr>
            <td>
                    ".U_DAT_NAROD.":
            </td>
            <td>
                    <b>".$sql_object->OH_BirthDate."</b>
            </td>
        </tr>
        <tr>
            <td>
                    ".U_ICO.":
            </td>
            <td>
                    <b>".$sql_object->OH_ICO."</b>
            </td>
        </tr>
        <tr>
            <td>
                    ".U_DIC.":
            </td>
            <td>
                    <b>".$sql_object->OH_DIC."</b>
            </td>
        </tr>
    </table>";
 
}
while(false);
mysql_close();
?>
</body>
</html>